/*
P1308 洛谷(luogu) 统计单词数
*/
#include <iostream>
#include <string>
using namespace std;

void format(string &str)
{
    for (int i = 0; i < str.length(); i++)
    {
        if (str[i] <= 'Z' && str[i] >= 'A')
        {
            str[i] = (char)(str[i] + 32);
        }
    }
}
int main()
{
    string str1, str2;
    int arr1[100]={0};
    int num = 0;
    cin >> str1;
    cin.sync();
    getline(cin, str2, '\n');
    str2 = " " + str2 + " ";
    format(str2);
    string str3 = " " + str1 + " ";
    format(str3);
    //cout<<"str1:"<<str1<<endl<<"str2:"<<str2<<endl<<"str3:"<<str3<<endl;
    for (int i = 0; i < str2.length(); i++)
    {
        if (str2.find(str3) != string::npos)
        {
            int position = str2.find(str3, 0);
            arr1[num] = position;
            num++;
            str2.replace(position, str3.length(), "  ");
        }
    }
    if(num == 0){
        cout<< -1 <<endl;
    }
    else
    {
        cout << num <<" "<<arr1[0]<< endl;
    }
    return 0;
    
}